-
Notifications
You must be signed in to change notification settings - Fork 151
[Config Registry] 5/5 Replace manual ConfigurationKeys by generated ones in the whole solution #7697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
anna-git
wants to merge
7
commits into
anna/config-inversion-configuration-analyzers-4
Choose a base branch
from
anna/config-inversion-use-generate-config-keys-5
base: anna/config-inversion-configuration-analyzers-4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+866
−2,428
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Oct 22, 2025
a74a26f to
864cbb6
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7697 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Unknown 🤷 Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0 | 2.83 KB | 3.5 KB | 672 B | 23.73% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0 | 5.48 KB | 5.14 KB | -336 B | -6.13% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 446μs | 2.59μs | 23.2μs | 0 | 0 | 0 | 5.48 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 473μs | 2.77μs | 25.8μs | 0 | 0 | 0 | 4.58 KB |
| master | RunWafRealisticBenchmark |
net472 | 492μs | 356ns | 1.28μs | 0 | 0 | 0 | 0 b |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 321μs | 920ns | 3.19μs | 0 | 0 | 0 | 2.83 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 362μs | 3.19μs | 31.1μs | 0 | 0 | 0 | 2.32 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 368μs | 449ns | 1.68μs | 0 | 0 | 0 | 0 b |
| #7697 | RunWafRealisticBenchmark |
net6.0 | 428μs | 2.03μs | 8.63μs | 0 | 0 | 0 | 5.14 KB |
| #7697 | RunWafRealisticBenchmark |
netcoreapp3.1 | 460μs | 2.57μs | 20.2μs | 0 | 0 | 0 | 4.58 KB |
| #7697 | RunWafRealisticBenchmark |
net472 | 499μs | 332ns | 1.2μs | 0 | 0 | 0 | 0 b |
| #7697 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 329μs | 2μs | 19.8μs | 0 | 0 | 0 | 3.5 KB |
| #7697 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 359μs | 2.69μs | 25.9μs | 0 | 0 | 0 | 2.32 KB |
| #7697 | RunWafRealisticBenchmarkWithAttack |
net472 | 371μs | 144ns | 519ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 60.6μs | 36.8ns | 133ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 72.2μs | 334ns | 1.34μs | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.161ns | 0.00536ns | 0.0208ns | 0 | 0 | 0 | 0 b |
| #7697 | SendRequest |
net6.0 | 61.3μs | 60.9ns | 211ns | 0 | 0 | 0 | 14.52 KB |
| #7697 | SendRequest |
netcoreapp3.1 | 71.7μs | 266ns | 958ns | 0 | 0 | 0 | 17.42 KB |
| #7697 | SendRequest |
net472 | 0.162ns | 0.00626ns | 0.0242ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ Fewer allocations 🎉
Slower ⚠️ in #7697
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
1.126
1,425,350.00
1,605,500.00
Fewer allocations 🎉 in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
640 B
304 B
-336 B
-52.50%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 1.126 | 1,425,350.00 | 1,605,500.00 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 640 B | 304 B | -336 B | -52.50% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.89ms | 1.31μs | 4.9μs | 0 | 0 | 0 | 640.3 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 3.99ms | 1.21μs | 4.19μs | 0 | 0 | 0 | 640.1 KB |
| master | OriginalCharSlice |
net472 | 2.66ms | 1.44μs | 5.59μs | 0 | 0 | 0 | 647.17 KB |
| master | OptimizedCharSlice |
net6.0 | 1.42ms | 502ns | 1.74μs | 0 | 0 | 0 | 976 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 2.77ms | 1.17μs | 4.53μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSlice |
net472 | 1.92ms | 1.12μs | 4.18μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 1.01ms | 744ns | 2.88μs | 0 | 0 | 0 | 640 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.92ms | 1.72μs | 6.64μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.14ms | 273ns | 946ns | 0 | 0 | 0 | 0 b |
| #7697 | OriginalCharSlice |
net6.0 | 2ms | 1.19μs | 4.6μs | 0 | 0 | 0 | 640.64 KB |
| #7697 | OriginalCharSlice |
netcoreapp3.1 | 4ms | 1.13μs | 4.09μs | 0 | 0 | 0 | 640.1 KB |
| #7697 | OriginalCharSlice |
net472 | 2.64ms | 538ns | 1.94μs | 0 | 0 | 0 | 647.17 KB |
| #7697 | OptimizedCharSlice |
net6.0 | 1.61ms | 902ns | 3.37μs | 0 | 0 | 0 | 976 B |
| #7697 | OptimizedCharSlice |
netcoreapp3.1 | 2.81ms | 1.6μs | 6.18μs | 0 | 0 | 0 | 104 B |
| #7697 | OptimizedCharSlice |
net472 | 2.01ms | 1.07μs | 4.13μs | 0 | 0 | 0 | 0 b |
| #7697 | OptimizedCharSliceWithPool |
net6.0 | 1.09ms | 1.09μs | 4.2μs | 0 | 0 | 0 | 304 B |
| #7697 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.86ms | 2.6μs | 10.1μs | 0 | 0 | 0 | 104 B |
| #7697 | OptimizedCharSliceWithPool |
net472 | 1.14ms | 729ns | 2.82μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 Fewer allocations 🎉
Faster 🎉 in #7697
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
1.253
757,519.87
604,379.02
Fewer allocations 🎉 in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.23 KB
41.85 KB
-386 B
-0.91%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 1.253 | 757,519.87 | 604,379.02 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.23 KB | 41.85 KB | -386 B | -0.91% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 714μs | 3.63μs | 16.6μs | 0 | 0 | 0 | 42.23 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 746μs | 4.1μs | 24.9μs | 0 | 0 | 0 | 41.86 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 939μs | 4.3μs | 23.2μs | 4.46 | 0 | 0 | 55.79 KB |
| #7697 | WriteAndFlushEnrichedTraces |
net6.0 | 766μs | 483ns | 1.87μs | 0 | 0 | 0 | 41.85 KB |
| #7697 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 605μs | 770ns | 2.98μs | 0 | 0 | 0 | 41.93 KB |
| #7697 | WriteAndFlushEnrichedTraces |
net472 | 885μs | 2.8μs | 10.1μs | 4.46 | 0 | 0 | 55.61 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.91μs | 8.67ns | 33.6ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.53μs | 5.29ns | 20.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.74μs | 3.2ns | 12.4ns | 0.151 | 0 | 0 | 987 B |
| #7697 | ExecuteNonQuery |
net6.0 | 1.88μs | 9.42ns | 41.1ns | 0 | 0 | 0 | 1.02 KB |
| #7697 | ExecuteNonQuery |
netcoreapp3.1 | 2.58μs | 11.4ns | 44.3ns | 0 | 0 | 0 | 1.02 KB |
| #7697 | ExecuteNonQuery |
net472 | 2.8μs | 4.63ns | 17.9ns | 0.144 | 0 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.75μs | 9.2ns | 44.1ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.26μs | 10.9ns | 45.1ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.48μs | 1.22ns | 4.56ns | 0.157 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.87μs | 7.73ns | 30ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.41μs | 7.48ns | 25.9ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.69μs | 4.57ns | 17.7ns | 0.167 | 0 | 0 | 1.1 KB |
| #7697 | CallElasticsearch |
net6.0 | 1.7μs | 9.33ns | 52ns | 0 | 0 | 0 | 1.03 KB |
| #7697 | CallElasticsearch |
netcoreapp3.1 | 2.39μs | 3.69ns | 14.3ns | 0 | 0 | 0 | 1.03 KB |
| #7697 | CallElasticsearch |
net472 | 3.52μs | 1.71ns | 6.4ns | 0.158 | 0 | 0 | 1.04 KB |
| #7697 | CallElasticsearchAsync |
net6.0 | 1.93μs | 9.75ns | 44.7ns | 0 | 0 | 0 | 1.01 KB |
| #7697 | CallElasticsearchAsync |
netcoreapp3.1 | 2.4μs | 8.52ns | 33ns | 0 | 0 | 0 | 1.08 KB |
| #7697 | CallElasticsearchAsync |
net472 | 3.75μs | 7.66ns | 28.7ns | 0.169 | 0 | 0 | 1.1 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.92μs | 7.18ns | 27.8ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.45μs | 8.55ns | 33.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.58μs | 2.98ns | 11.5ns | 0.141 | 0 | 0 | 915 B |
| #7697 | ExecuteAsync |
net6.0 | 1.92μs | 8.62ns | 34.5ns | 0 | 0 | 0 | 952 B |
| #7697 | ExecuteAsync |
netcoreapp3.1 | 2.48μs | 10.4ns | 40.4ns | 0 | 0 | 0 | 952 B |
| #7697 | ExecuteAsync |
net472 | 2.72μs | 5.92ns | 22.9ns | 0.135 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net6.0 | 7μs | 11.5ns | 44.4ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.7μs | 19.8ns | 76.9ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.3μs | 7.96ns | 29.8ns | 0.489 | 0 | 0 | 3.18 KB |
| #7697 | SendAsync |
net6.0 | 6.93μs | 6.75ns | 25.3ns | 0 | 0 | 0 | 2.36 KB |
| #7697 | SendAsync |
netcoreapp3.1 | 8.82μs | 20.9ns | 78ns | 0 | 0 | 0 | 2.9 KB |
| #7697 | SendAsync |
net472 | 12.3μs | 16ns | 61.9ns | 0.489 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #7697
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
1.188
459,050.00
545,350.00
More allocations ⚠️ in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
57.34 KB
65.54 KB
8.19 KB
14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
273.29 KB
275.24 KB
1.95 KB
0.71%
Fewer allocations 🎉 in #7697
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
273.14 KB
258.05 KB
-15.1 KB
-5.53%
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 1.188 | 459,050.00 | 545,350.00 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 57.34 KB | 65.54 KB | 8.19 KB | 14.29% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 273.29 KB | 275.24 KB | 1.95 KB | 0.71% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 273.14 KB | 258.05 KB | -15.1 KB | -5.53% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 45μs | 304ns | 2.83μs | 0 | 0 | 0 | 43.78 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 52.5μs | 503ns | 4.91μs | 0 | 0 | 0 | 43.09 KB |
| master | StringConcatBenchmark |
net472 | 57μs | 278ns | 1.15μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 460μs | 1.51μs | 8.01μs | 0 | 0 | 0 | 273.29 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 510μs | 2.39μs | 10.7μs | 0 | 0 | 0 | 273.14 KB |
| master | StringConcatAspectBenchmark |
net472 | 411μs | 1.98μs | 14.3μs | 0 | 0 | 0 | 278.53 KB |
| #7697 | StringConcatBenchmark |
net6.0 | 45.2μs | 263ns | 2.1μs | 0 | 0 | 0 | 43.84 KB |
| #7697 | StringConcatBenchmark |
netcoreapp3.1 | 49.9μs | 272ns | 2.43μs | 0 | 0 | 0 | 43.02 KB |
| #7697 | StringConcatBenchmark |
net472 | 56.6μs | 221ns | 827ns | 0 | 0 | 0 | 65.54 KB |
| #7697 | StringConcatAspectBenchmark |
net6.0 | 551μs | 2.75μs | 11.7μs | 0 | 0 | 0 | 275.24 KB |
| #7697 | StringConcatAspectBenchmark |
netcoreapp3.1 | 502μs | 1.37μs | 4.75μs | 0 | 0 | 0 | 258.05 KB |
| #7697 | StringConcatAspectBenchmark |
net472 | 410μs | 2.29μs | 15.2μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 2.71μs | 13.2ns | 54.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.62μs | 12.5ns | 48.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.95μs | 6.07ns | 23.5ns | 0.254 | 0 | 0 | 1.64 KB |
| #7697 | EnrichedLog |
net6.0 | 2.73μs | 2.3ns | 8.6ns | 0 | 0 | 0 | 1.7 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 3.67μs | 17.4ns | 71.6ns | 0 | 0 | 0 | 1.7 KB |
| #7697 | EnrichedLog |
net472 | 3.88μs | 2.51ns | 9.73ns | 0.253 | 0 | 0 | 1.64 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 123μs | 78.6ns | 305ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 126μs | 43ns | 161ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 165μs | 56.7ns | 204ns | 0 | 0 | 0 | 4.51 KB |
| #7697 | EnrichedLog |
net6.0 | 123μs | 95ns | 329ns | 0 | 0 | 0 | 4.31 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 127μs | 156ns | 585ns | 0 | 0 | 0 | 4.31 KB |
| #7697 | EnrichedLog |
net472 | 168μs | 147ns | 570ns | 0 | 0 | 0 | 4.52 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 5.17μs | 21.3ns | 82.6ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 7.06μs | 15.3ns | 57.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.73μs | 5.53ns | 21.4ns | 0.307 | 0 | 0 | 2.08 KB |
| #7697 | EnrichedLog |
net6.0 | 5.06μs | 16.6ns | 64.4ns | 0 | 0 | 0 | 2.26 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 6.82μs | 20.1ns | 77.7ns | 0 | 0 | 0 | 2.26 KB |
| #7697 | EnrichedLog |
net472 | 7.59μs | 8.87ns | 33.2ns | 0.304 | 0 | 0 | 2.08 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendReceive |
net6.0 | 2.15μs | 1.92ns | 7.2ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 12.6ns | 52ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.11μs | 5.92ns | 22.9ns | 0.185 | 0 | 0 | 1.2 KB |
| #7697 | SendReceive |
net6.0 | 1.93μs | 9.94ns | 48.7ns | 0 | 0 | 0 | 1.2 KB |
| #7697 | SendReceive |
netcoreapp3.1 | 2.73μs | 9.75ns | 37.7ns | 0 | 0 | 0 | 1.2 KB |
| #7697 | SendReceive |
net472 | 3.13μs | 3.49ns | 13.5ns | 0.188 | 0 | 0 | 1.2 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 4.36μs | 11.4ns | 44.1ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.82μs | 16.5ns | 64ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.56μs | 9.44ns | 36.5ns | 0.299 | 0 | 0 | 2.03 KB |
| #7697 | EnrichedLog |
net6.0 | 4.26μs | 19.6ns | 78.3ns | 0 | 0 | 0 | 1.58 KB |
| #7697 | EnrichedLog |
netcoreapp3.1 | 5.64μs | 14.7ns | 56.9ns | 0 | 0 | 0 | 1.63 KB |
| #7697 | EnrichedLog |
net472 | 6.65μs | 7.36ns | 28.5ns | 0.298 | 0 | 0 | 2.03 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 782ns | 3.87ns | 16.4ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 984ns | 4.62ns | 17.9ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 917ns | 0.137ns | 0.514ns | 0.0879 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 932ns | 4.67ns | 20.9ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.17μs | 5.15ns | 19.3ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.13μs | 0.23ns | 0.86ns | 0.102 | 0 | 0 | 658 B |
| master | StartFinishTwoScopes |
net6.0 | 1.73μs | 9.05ns | 43.4ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
netcoreapp3.1 | 2.24μs | 11.4ns | 54.5ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
net472 | 2.2μs | 1.84ns | 6.89ns | 0.166 | 0 | 0 | 1.08 KB |
| #7697 | StartFinishSpan |
net6.0 | 794ns | 3.64ns | 14.6ns | 0 | 0 | 0 | 576 B |
| #7697 | StartFinishSpan |
netcoreapp3.1 | 964ns | 4.96ns | 23.8ns | 0 | 0 | 0 | 576 B |
| #7697 | StartFinishSpan |
net472 | 902ns | 0.103ns | 0.372ns | 0.0903 | 0 | 0 | 578 B |
| #7697 | StartFinishScope |
net6.0 | 950ns | 0.335ns | 1.3ns | 0 | 0 | 0 | 696 B |
| #7697 | StartFinishScope |
netcoreapp3.1 | 1.15μs | 6.02ns | 28.2ns | 0 | 0 | 0 | 696 B |
| #7697 | StartFinishScope |
net472 | 1.13μs | 1.11ns | 4.31ns | 0.102 | 0 | 0 | 658 B |
| #7697 | StartFinishTwoScopes |
net6.0 | 1.76μs | 8.84ns | 40.5ns | 0 | 0 | 0 | 1.19 KB |
| #7697 | StartFinishTwoScopes |
netcoreapp3.1 | 2.25μs | 11.6ns | 58.2ns | 0 | 0 | 0 | 1.19 KB |
| #7697 | StartFinishTwoScopes |
net472 | 2.18μs | 2.24ns | 8.69ns | 0.162 | 0 | 0 | 1.08 KB |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunOnMethodBegin |
net6.0 | 1.1μs | 1.17ns | 4.52ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.42μs | 7.26ns | 33.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.43μs | 1.4ns | 5.43ns | 0.101 | 0 | 0 | 658 B |
| #7697 | RunOnMethodBegin |
net6.0 | 1.08μs | 0.437ns | 1.69ns | 0 | 0 | 0 | 696 B |
| #7697 | RunOnMethodBegin |
netcoreapp3.1 | 1.39μs | 7.24ns | 36.9ns | 0 | 0 | 0 | 697 B |
| #7697 | RunOnMethodBegin |
net472 | 1.5μs | 2.37ns | 9.18ns | 0.104 | 0 | 0 | 658 B |
c1f7943 to
56bd199
Compare
a70301b to
caf072d
Compare
52bf0a8 to
38efd42
Compare
|
83d9c7d to
22a4a69
Compare
38efd42 to
77c76ec
Compare
22a4a69 to
8c8402b
Compare
77c76ec to
5959568
Compare
8c8402b to
15b3e9b
Compare
5959568 to
0672899
Compare
15b3e9b to
071fbd4
Compare
0672899 to
64b591b
Compare
071fbd4 to
0a751b8
Compare
64b591b to
4b52ac0
Compare
0a751b8 to
f5dd040
Compare
4b52ac0 to
cf4f9e4
Compare
f5dd040 to
df4a547
Compare
cf4f9e4 to
d5e1ed2
Compare
9860a88 to
3197af6
Compare
4289adc to
efb749a
Compare
3197af6 to
e6d6574
Compare
efb749a to
4a09baa
Compare
e6d6574 to
dcd2f3c
Compare
4a09baa to
6d0d644
Compare
dcd2f3c to
196d5e0
Compare
6d0d644 to
0949fba
Compare
196d5e0 to
3d682bd
Compare
0949fba to
4f85efe
Compare
3d682bd to
e99b9b3
Compare
4f85efe to
3ea1404
Compare
e99b9b3 to
667cda0
Compare
3ea1404 to
9662e0f
Compare
667cda0 to
888141d
Compare
9662e0f to
6f43191
Compare
anna-git
added a commit
that referenced
this pull request
Nov 26, 2025
…#7698) ## Context Part of **Configuration Inversion (Step 3)** - Stack progress: 1. [#7548](#7548) - Add GitLab step and JSON configuration file 2. [#7688](#7688) - Cleanup configuration / platform keys + analyzers 3. **→ [#7698](#7698) - Generate ConfigurationKeys with source generator (this PR)** 4. [#7689](#7689) - Aliases handling via source generator 5. [#7697](#7697) - Replace manual ConfigurationKeys by generated ones in the whole solution ## Summary Adds source generator to auto-generate `ConfigurationKeys` from `supported-configurations.json` with name mapping to preserve existing constant names. ## Changes **Source Generator:** - [ConfigurationKeysGenerator](cci:7://file:///var/folders/4j/q1f1tvc503g_thnq6p79cp500000gp/T/SourceGeneratedDocuments/D0E9C9C62821E2CB6FADE080/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator:0:0-0:0) reads `supported-configurations.json` and [supported-configurations-docs.yaml](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Configuration/supported-configurations-docs.yaml:0:0-0:0) - Auto-generates `ConfigurationKeys` with nested product classes (AppSec, CIVisibility, OpenTelemetry, etc.) - Generates XML documentation and `[Obsolete]` attributes from JSON **Configuration Mapping:** - `configuration_keys_mapping.json` maps env vars to original constant names (e.g., `DD_TRACE_ENABLED` → `TraceEnabled`) - Avoids refactoring hundreds of references across codebase **Updates:** - Added missing `DD_TRACE_ACTIVITY_LISTENER_ENABLED` key - Committed temporary [ConfigurationKeys2.g.cs](cci:7://file:///Users/anna.yafi/go/src/github.com/DataDog/dd-trace-dotnet3/tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/ConfigurationKeysGenerator/ConfigurationKeys2.g.cs:0:0-0:0) files for validation ## Motivation Makes `supported-configurations.json` the single source of truth while preserving existing constant names to avoid massive refactoring. ## Test Coverage - Added `ConfigurationKeysGeneratorTests.cs` with comprehensive unit tests - Tests validate generator output, XML documentation generation, and obsolete attribute application - Tests cover nested product classes, deprecations, and YAML documentation integration - All existing tests pass without modification ## Related Work Builds on #7548 (configuration registry) and #7688 (PlatformKeys separation + analyzers).
888141d to
1a1742c
Compare
6f43191 to
2bba95f
Compare
1a1742c to
13b5134
Compare
07aaab2 to
8b47c49
Compare
Co-authored-by: Andrew Lock <[email protected]>
8b47c49 to
9e16b03
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Part of Configuration Inversion (Step 5) - Stack progress:
Summary of changes
Fixed the ConfigurationKeysGenerator to properly read and apply the configuration_keys_mapping.json file, and extracted common file header comments to a reusable constant.
Key changes:
"mappings"field as an object instead of an arrayConstants.ConfigurationGeneratorCommentfor reuse across multiple generatorsReason for change
The configuration_keys_mapping.json file was being ignored during code generation, causing the generator to produce incorrect constant names. This meant that any manual edits to constant names in the mapping file were not being respected, and the generated code would use auto-generated names instead of the explicitly mapped ones.
Additionally, the file header comments explaining that files are auto-generated were duplicated across generators, violating DRY principles.
Implementation details
Fixed array extraction logic: Replaced the call to JsonReader.ExtractJsonObjectSection() with custom array extraction code that:
"mappings":key in the JSON[bracket]Resolved variable scope issue: Reused existing
inStringandescapeNextvariables from the outer scope instead of redeclaring them, fixing compilation errors.Centralized header comments: Created
Constants.ConfigurationGeneratorCommentcontaining the standardized auto-generation notice and updated both generators to use it.Test coverage
Other details
This fix ensures that the explicit naming conventions defined in configuration_keys_mapping.json are respected, maintaining consistency with the existing codebase and preventing future confusion when constant names don't match their expected values.